package liuliu.throughwaring.view;

import android.app.Activity;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import android.widget.ImageView;

import net.tsz.afinal.annotation.view.CodeNote;

import liuliu.custom.method.Utils;
import liuliu.throughwaring.R;

/**
 * Created by Administrator on 2016/3/17.
 */
public class PictureView extends Activity {
 ImageView image;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.picture_dialog);
        image= (ImageView) findViewById(R.id.picture_image);
        String p = getIntent().getStringExtra("picture");

       // image.setImageResource(R.mipmap.person_header);
        if (p.equals("")) {
            image.setImageResource(R.mipmap.person_header);
        } else {
            Bitmap bitmap = Utils.getBitmapByte(p);
            image.setImageBitmap(bitmap);
        }

        image.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

}
